﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;

namespace Dataqueay.Commands
{
    public class QueryCommand : ICommand
    {
        public event EventHandler CanExecuteChanged;
        public Action<object> _execute { get; set; }
        public Func<bool> _canExcute { get; set; }

        public bool CanExecute(object parameter)
        {
            return _canExcute == null ? true : _canExcute();
        }

        public void Execute(object parameter)
        {
            _execute(parameter);
        }
    }
}
